/**
 * @author meiqin liu（叶子）
 * @version 1.0.0
 * @date 2025/4/22 8:19
 */
//内存块
public class MemoryBLock {
    public int startAddress;
    public int size;
    public boolean isFree;
    public String allocatedTo;

    public MemoryBLock(int startAddress, int size) {
        this.startAddress = startAddress;
        this.size = size;
        this.isFree = true;
        this.allocatedTo = "";
    }
    @Override
    public String toString() {
        return startAddress + "\t" + size + "\t" + (isFree?"空闲":"占用(" + allocatedTo + ")");
    }
}
